package quoridorGame;

public class Square {
	int squareRow, squareColumn;
	
	public Square(int row, int column) {
		require(inBounds(row) && inBounds(column), "row and column valid");
		squareRow = row;
		squareColumn = column;
	}
	
	public int getRow () {
		return squareRow;
	}
	
	public int getColumn () {
		return squareColumn;
	}
	
	
	private boolean inBounds(int position) {
		boolean evaluation = true;
		
		if (position < 0 || position > 8) {
			evaluation = false;
		}
		
		return evaluation;
	}
	
	//require function sourced from John Potter's labs
	private static void require (boolean b, String desc)
    {
        if (!b)
            throw new IllegalStateException ("require" + desc);
    }
}
